package dyyx.dto;

public class KafkaOffsetInfo {
	public String topic;

	public int partition;

	public Long beginning;
    public Long end;
    // consumer
    public Long offset;
    public String metadata;
    
    public Long lag(){
    	if(end==null || end<=0){
    		return null;
    	}
    	if(offset==null || offset<=0){
    		return null;
    	}
    	
    	return end.longValue() - offset.longValue() ;
    }


}
